package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Vmenu extends javax.swing.JFrame {
	private JMenuBar menu;
	private JMenu jMenu1;
	private JMenuItem menu1;
	private JMenuItem MenuTabla;
	private JMenuItem MenuCalendario;
	private JMenu jMenu3;
	private JMenuItem MenuComp;
	private JMenu jMenu2;
	private JMenuItem menu3;

	/**
	* Auto-generated main method to display this JFrame
	*/
		
	public Vmenu() {
		super();
		initGUI();
	    PanelFondo f = new PanelFondo();
	    this.add(f, BorderLayout.CENTER);
	    f.setOpaque(false);
	    this.pack();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				menu = new JMenuBar();
				setJMenuBar(menu);
				{
					jMenu1 = new JMenu();
					menu.add(jMenu1);
					jMenu1.setText("Registrar");
					{
						menu1 = new JMenuItem();
						jMenu1.add(menu1);
						menu1.setText("Jueces");
					}
					{
						menu3 = new JMenuItem();
						jMenu1.add(menu3);
						menu3.setText("Equipos");
					}
				}
				{
					jMenu2 = new JMenu();
					menu.add(jMenu2);
					jMenu2.setText("Generar");
					{
						MenuComp = new JMenuItem();
						jMenu2.add(MenuComp);
						MenuComp.setText("Competencia");
					}
				}
				{
					jMenu3 = new JMenu();
					menu.add(jMenu3);
					jMenu3.setText("Consultar");
					{
						MenuCalendario = new JMenuItem();
						jMenu3.add(MenuCalendario);
						MenuCalendario.setText("Calendario");
					}
					{
						MenuTabla = new JMenuItem();
						jMenu3.add(MenuTabla);
						MenuTabla.setText("Tabla de Posiciones");
					}
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
public void addListener(ActionListener action){
	menu1.addActionListener(action);
	menu3.addActionListener(action);
	MenuComp.addActionListener(action);
	MenuCalendario.addActionListener(action);
	MenuTabla.addActionListener(action);
}
}
